// Blogger JSON - Learn adi nugraha
var postTitle     = new Array(),
    postUrl       = new Array(),
    postDate      = new Array(),
    postMonth     = new Array(),
    postYear      = new Array(),
    postYearMonth = new Array(),
    postDateNum   = new Array(),
    numberfeed    = 0,
    month         = ["Januari", "Februari", "Maret", "April", "Mei", "Juni", "Juli", "Agustus", "September", "Oktober", "November", "Desember"];

function loadarchive(a) {
    function b() {
        if ("entry" in a.feed) {
            var d = a.feed.entry.length;
            numberfeed = d;
            ii = 0;
            for (var h = 0; h < d; h++) {
                var m = a.feed.entry[h],
                    e = m.title.$t,
                    l = m.published.$t.substring(0, 10),
                    p = m.published.$t.substring(5, 7),
                    g = m.published.$t.substring(8, 10),
                    n = month[parseInt(p, 10) - 1] + " " + m.published.$t.substring(0, 4),
                    c = "/" + m.published.$t.substring(0, 4) + "_" + p + "_01_archive.html",
                    j;
                for (var f = 0; f < m.link.length; f++) {
                    if (m.link[f].rel == "alternate") {
                        j = m.link[f].href;
                        break
                    }
                }
                var o = "";
                for (var f = 0; f < m.link.length; f++) {
                    if (m.link[f].rel == "enclosure") {
                        o = m.link[f].href;
                        break
                    }
                }
                postTitle.push(e);
                postDate.push(l);
                postUrl.push(j);
                postYearMonth.push(n);
                postYear.push(c);
                postDateNum.push(g)
            }
        }
    }
    b();
    displayToc();
}

function displayToc() {
    var a = 0,
        b = 0;
    while (b < postTitle.length) {
        temp1 = postYearMonth[b];
        document.write('<div class="monthyear">');
        document.write('<p class="year">' + temp1 + '</b>');
        document.write('<ul>');
        firsti = a;
        do {
            document.write('<li>');
            document.write('<b class="date">' + postDateNum[a] + '</b>' + ' - <a href="' + postUrl[a] + '" target="_blank">' + postTitle[a] + '</a>');
            document.write('</li>');
            a = a + 1
        } while (postYearMonth[a] == temp1);
        b = a;
        document.write('</ul>');
        document.write('</div>');
        if (b > postTitle.length) {
            break
        }
    }
}